﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UsersList.ascx.cs" Inherits="BigLotterySyndicate.Secured.Users.Controls.UsersList" %>
<%@ Register TagPrefix="Syndicate" TagName="Pager" Src="~/Controls/Pager.ascx" %>
<%@ Register TagPrefix="Syndicate" TagName="UserListItem" Src="~/Secured/Controls/UserListItem.ascx" %>
<div class="breadcrumb">
<a href="/Secured/Default.aspx?Ns=0">Home</a> / <b>Manage users</b>
</div>
<div class="content-wrapper">
<asp:MultiView ID="MultiViewList" runat="server">
<asp:View ID="ViewList" runat="server">
<Syndicate:Pager runat="server" ID="TopPager" PageSize="40" PageIndexPageParam="Page" OnPageIndexChanged="Pager_PageIndexChanged" Visible="true"/>
<table cellpadding="2" cellspacing="2">
<thead>
<tr>
<th class="left">User name</th>
<th>Draws entered</th>
<th>Money spent</th>
<th>Funds remaining</th>
<th>Administrator</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<asp:Repeater ID="RepeaterList" runat="server">
    <ItemTemplate>
    <Syndicate:UserListItem ID="UserListItem" runat="server" />    
    </ItemTemplate>    
    <AlternatingItemTemplate>
    <Syndicate:UserListItem ID="UserListItem" runat="server" AlternateRow="True" />    
    </AlternatingItemTemplate>
</asp:Repeater>
</tbody>
</table>
<Syndicate:Pager runat="server" ID="BottomPager" PageSize="40" PageIndexPageParam="Page" OnPageIndexChanged="Pager_PageIndexChanged" Visible="false"/>
</asp:View>
<asp:View ID="ViewEmpty" runat="server">
<p>No users found.</p>
</asp:View>
</asp:MultiView>

<p><asp:HyperLink ID="linkCreate" Text="Add new user" NavigateUrl="/Secured/Users/Create.aspx" runat="server"></asp:HyperLink></p>
<p>
<a href="mailto:<%= PrintUsersEmails() %>">Send email to all users</a>
</p>
</div>
    <div class="content-wrapper-right">
<img src="/Assets/Images/lotto_badge.png" />
<img src="/Assets/Images/euro_badge.png" />
</div>